﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Lokad.Monitoring.Persistence.Models.RsmDocument>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Report
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <%= (Model.IsFault ? "<h2 class=\"fault\">" : "<h2 class=\"success\">") + ViewData["name"] + "</h2>" %>

    <table>
        <tr>
            <th>Name</th>
            <th>Value</th>
            <th>Tags</th>
        </tr>

        <% foreach(var indicator in Model.Indicators) { %>

        <tr>
            <td><%= Html.Encode(indicator.Name) %></td>
            <td><%= Html.Encode(indicator.Value) %></td>
            <td><%= Html.Encode(indicator.Tags) %></td>
        </tr>
        <% } %>
    </table>
    
    <% foreach(var message in Model.Messages) { %>

    <p><%= Html.Encode(message.Updated) %> - <b><%= Html.Encode(message.Title) %></b> (<%= Html.Encode(message.Tags) %>)</p>
    <pre><%=Html.Encode(message.Summary) %></pre>

    <%} %>

</asp:Content>
